
# while 循环遍历列表
"""
mylist = ["itheima","itcast","python"]
index = 0

while index<len(mylist):
    element = mylist[index]
    
    print(f"列表的第{index+1}个元素为{element}")
    index+=1



"""

def list_for_func():
    mylist = [1,2,3,4,5,6,7]
    for element in mylist:
        print(element,end = ' ')

list_for_func()
